package vip.fuxk.neav.config;

import org.noear.redisx.RedisClient;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;
import org.noear.solon.cache.jedis.RedisCacheService;
import org.noear.solon.data.cache.CacheService;

@Configuration
public class RedisConfig {

    @Bean
    public RedisClient redisClient(@Inject("${neav.redis}") RedisClient client) {
        return client;
    }
    

    @Bean
    public CacheService cacheService(@Inject RedisClient client){
        return new RedisCacheService(client, 30);
    }
    

}